In storage devices such as a magnetic disk device, servo patterns used for positioning control of a recording/reproducing head are formed on a recording medium such as a magnetic disk. To form such servo patterns on the recording medium, seed patterns formed at a part of the recording medium in the radial direction, and spiral servo patterns formed in a spiral manner so as to intersect the seed patterns may be used. The storage device uses the servo patterns detected by the recording/reproducing head to control positioning of the recording/reproducing head on a target track on the recording medium.
Such a storage device that performs the positioning control of the recording/reproducing head using the servo patterns, before recording the servo patterns in sectors, detects the spiral servo patterns from a read signal supplied from the recording/reproducing head, and generates a value incremented every time an interrupt is generated in association with the detection of the spiral patterns as a spiral number of the detected spiral servo patterns.
In the conventional technology, if the interrupt generated in association with the detection of the spiral patterns is skipped (not generated), the value incremented every time the interrupt is generated fails to be updated, resulting in a discrepancy in the spiral number of the detected spiral servo patterns.